package com.linyaonan.leetcode.easy._633;

/**
 * @author: Lin
 * @date: 2020/1/4
 */
public class SumOfSquare {
    public boolean judgeSquareSum(int c) {
        int flag = (int) Math.sqrt(c >> 1);
        for (int a = 0; a <= flag; a++) {
            double b = Math.sqrt(c - a * a);
            if (b == (int) b) {
                return true;
            }
        }
        return false;
    }
}
